]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Take scale factor into account to calculate spacing
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 19 Feb 2021 18:20:32 +0000 (19:20 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 21 Feb 2021 16:25:17 +0000 (16:25 +0000)
This is a statically defined size and we need to adjust for scaleFactor
ourselves, so do that and multiply those two values by the scale factor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1701>

js/ui/workspacesView.js

index c4b3d82528ede1924d26b317a0326b4f988c358b..fb9eafb0a8f2aabf3302eb18bc019c6d1666b59b 100644 (file)
@@ -228,8 +228,10 @@ class WorkspacesView extends WorkspacesViewBase {
         }
 
         const spacing = (availableSpace - workspaceSize * 0.05) * (1 - fitMode);
+        const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage);
 
-        return Math.clamp(spacing, WORKSPACE_MIN_SPACING, WORKSPACE_MAX_SPACING);
+        return Math.clamp(spacing, WORKSPACE_MIN_SPACING * scaleFactor,
+            WORKSPACE_MAX_SPACING * scaleFactor);
     }
 
     _getWorkspaceModeForOverviewState(state) {